﻿using EkStudio.com.bean.xml.reflection;
using EkStudio.com.bean.xml.RootInterface;
using System.Collections.Generic;
using System;

namespace EkStudio.com.bean.xml.BillMapping
{
    public class BillDataMapGroupItem: BillUiFormatNode
    {
        private string caption = "分组标签";//分组caption
        private string key = "group_key";//分组key
        private string languageTexts = "";//模块多语言
        private string targetCaption = "";//映射的模块标签
        private string targetKey = "";//映射的模块名称
        private string targetSheet = "";//映射的模块子表
        private string groupType = "";//出库还是入库(蓝字还是红字)
        private string stockType = "";//影响库存的当月入库、当月出库、当月期初三种类型数据
        private string statusCaption = "";//出入库状态字段
        private string statusKey = "";//出入库状态字段key
        private string statusSource = "";//出入库状态字段数据源
        private string statusSuccess = "";//保存成功的状态
        private string statusFail = "";//保存失败状态
        private string keyFieldCaption = "";//关键字段,用来异常提示
        private string keyFieldLanguage = "";//关键字段多语言
        private string dateCaption = "";//日期字段
        private string dateKey = "";//日期字段key
        private string dateSource = "";//日期字段数据源
        private bool validateStock = true;//验证库存数量是否足够,红字有效
        private string content = "";//sql数据源
        private string pluginExpand = "[NULL]";//出入扩展代码

        private List<BillDataMapField> field = null;


        [Xml]
        public string Caption
        {
            get { return caption; }
            set { caption = value; }
        }
        [Xml]
        public string Key
        {
            get { return key; }
            set { key = value; }
        }

        [Xml]
        public string LanguageTexts
        {
            get { return languageTexts; }
            set { languageTexts = value; }
        }
        [Xml]
        public string TargetCaption
        {
            get { return targetCaption; }
            set { targetCaption = value; }
        }
        [Xml]
        public string TargetKey
        {
            get { return targetKey; }
            set { targetKey = value; }
        }
        [Xml]
        public string TargetSheet
        {
            get { return targetSheet; }
            set { targetSheet = value; }
        }

        [Xml]
        public string GroupType
        {
            get { return groupType; }
            set { groupType = value; }
        }
        [Xml]
        public string StockType
        {
            get { return stockType; }
            set { stockType = value; }
        }

        [Xml]
        public string StatusCaption
        {
            get { return statusCaption; }
            set { statusCaption = value; }
        }
        [Xml]
        public string StatusKey
        {
            get { return statusKey; }
            set { statusKey = value; }
        }
        [Xml]
        public string StatusSource
        {
            get { return statusSource; }
            set { statusSource = value; }
        }
        [Xml]
        public string StatusSuccess {
            get { return statusSuccess; }
            set { statusSuccess = value; }
        }
        [Xml]
        public string StatusFail
        {
            get { return statusFail; }
            set { statusFail = value; }
        }
        [Xml]
        public string DateCaption
        {
            get { return dateCaption; }
            set { dateCaption = value; }
        }
        [Xml]
        public string DateKey
        {
            get { return dateKey; }
            set { dateKey = value; }
        }
        [Xml]
        public string DateSource
        {
            get { return dateSource; }
            set { dateSource = value; }
        }
        [Xml]
        public bool ValidateStock
        {
            get { return validateStock; }
            set { validateStock = value; }
        }

        [XmlElement]
        public string Content
        {
            get { return content; }
            set { content = value; }
        }

        [Xml]
        public string PluginExpand
        {
            get { return pluginExpand; }
            set { pluginExpand = value; }
        }
        [XmlElement]
        public List<BillDataMapField> Field
        {
            get { return field; }
            set { field = value; }
        }
        [XmlTransient]
        public object ParentBean
        {
            get { return null;}
            set { }
        }
        [Xml]
        public string KeyFieldCaption
        {
            get
            {
                return keyFieldCaption;
            }

            set
            {
                keyFieldCaption = value;
            }
        }
        [Xml]
        public string KeyFieldLanguage
        {
            get
            {
                return keyFieldLanguage;
            }

            set
            {
                keyFieldLanguage = value;
            }
        }

        public object Clone()
        {
            throw new NotImplementedException();
        }
    }
}
